<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
	<title><{config_item('website_title')}></title>
	<meta content="<{config_item('website_keywords')}>" name="Keywords">
	<meta content="<{config_item('website_desc')}>" name="description"/>
	<script type="text/javascript" src="/public/js/jquery.js"></script>
	<script type="text/javascript" src="/public/js/validform.js"></script>
	<script type="text/javascript" src="/public/js/layer/layer.js"></script>
	<link rel="stylesheet" type="text/css" href="/views/web/skin/css/style.css" />
</head>
<body>
	<div class="wrap">
		<{include file="web/header.html"}>
		 <!-- 内容 -->
		 <div class="wrapbox">
		 	<div class="scrapnav">
				您的当前位置：<a href="<{site_url("/welcome")}>">首页</a>><a href="<{site_url("/member")}>">我的账户</a>
		 	</div>
		 	<div class="contenwrap">
		 		<div class="publictitle">
		 			优惠券兑换
		 		</div>
				<form name="add" id="add" method="post" action="<{site_url('/api/member/coupons/exchange_save')}>">
		 		<div class="exchangebox">
	 				<div class="loginboxleft_box clear">
	 					<div class="loginleft">
	 						密码：
	 					</div>
	 					<div class="loginright">
	 						<input type="text" class="inputText" placeholder="请输入密码" name="password" datatype="*" nullmsg="优惠券密码不能为空">
	 					</div>
	 				</div>
					<input type="submit" class="exchangebtn" value="确认兑换">
		 		</div>
				</form>
		 	</div>
		 	
		 </div>
		<{include file="web/footer.html"}>
	</div>
	<script type="text/javascript" >
		//验证表单
		$(function(){
			$.Tipmsg.r=null;
			$("#add").Validform({
				tiptype:function(msg){
					layer.msg(msg);
				},
				tipSweep:true,
				ajaxPost:true,
				callback:function(data){
					if(data.status=="y"){
						layer.msg('兑换成功');
						setTimeout(function(){
							window.history.back();
						},2000)
					} else {
						layer.msg(data.info);
					}
				}
			});
		})
	</script>
</body>
</html>